/***********************************************************************/
/*                                                                     */
/*  FILE        :Typedefine.h                                              */
/*  DATE        :Thu, Jul 09, 2009                                     */
/*  DESCRIPTION :define scalar types.                                  */
/*  CPU GROUP   :2A                                                    */
/*                                                                     */
/*  This file is generated by Renesas Project Generator (Ver.4.12).    */
/*                                                                     */
/***********************************************************************/

#ifndef TYPEDEFINE_H
#define TYPEDEFINE_H

//#include <types.h>

typedef unsigned char uchar;	/* unsigned 8 bit type definition */
typedef unsigned short   uint;	  /* unsigned 16 bit type definition */
typedef unsigned long ulong;	/* unsigned 32 bit type definition */

typedef unsigned char u8;	  /* unsigned 8 bit type definition */
typedef signed char   s8;		/* signed 8 bit type definition */
typedef unsigned short int  u16;	/* unsigned 16 bit type definition */
typedef signed   short int    s16;	/* signed 16 bit type definition */
typedef unsigned long u32;	/* unsigned 32 bit type definition */
typedef signed long   s32;	/* signed 32 bit type definition */

typedef unsigned int size_t ;
#define NULL ((void *)0)
    
typedef union 
{
   	uchar Byte;
  	struct {
	uchar BIT0        :1;                                       /* Bit 0 */
	uchar BIT1        :1;                                       /* Bit 1 */
	uchar BIT2        :1;                                       /* Bit 2 */
	uchar BIT3        :1;                                       /* Bit 3 */
	uchar BIT4        :1;                                       /* Bit 4 */
	uchar BIT5        :1;                                       /* Bit 5 */
	uchar BIT6        :1;                                       /* Bit 6 */
	uchar BIT7        :1;                                       /* Bit 7 */
  } Bits;
} BitType;
typedef union {
  uchar Byte;
  struct {
    uchar TESTMODE          :4;               /* test mode */
    uchar                            :1;               /*  */
    uchar LANGUAGESEL    :1;
    uchar ICEMAKWERSEL  :1;               /*  */
    uchar VARSELECT         :1; 

  } Bits;
}FLAGSEND2;
typedef union{
	signed int Word;
	struct{
		unsigned int ByteH:8;
		unsigned int ByteL:8;
		}WordHL;
	}MyWord;


// 数据类型
typedef signed char       S8;
typedef unsigned char     U8;
typedef signed short      S16;
typedef unsigned short    U16;
typedef signed long       S32;
typedef unsigned long     U32;
typedef unsigned char     Bool;
typedef float              F32;
typedef double             F64;

// 小端
typedef union
{
    U16 u16Word;
    struct
    {
        U8 u8Lsb;
        U8 u8Msb;
    } sByte;
} LittleEndian_tu;
// 大端
typedef union
{
    U16 u16Word;
    struct
    {
        U8 u8Msb;
        U8 u8Lsb;
    } sByte;
} BigEndian_tu;

#endif
